// src/api/routes/userRoutes.js

import express from 'express';
import { register, login, getCurrentUser, logout, getWXAccessToken } from '../controllers/UserController';
import { authenticateToken } from '../middlewares/authMiddleware';


const router = express.Router();

// 注册新用户的路由
router.post('/register', register);

// 用户登录的路由
router.post('/login', login);

// 获取用户信息
router.get('/currentUser', authenticateToken, getCurrentUser);

// 登出
router.post('/logout', logout)

// 获取微信 AccessToken
router.post('/getWXAccessToken', getWXAccessToken)

export default router;
